package com.xiao.hao.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import com.xiao.hao.config.CheckParamsAnnotation;
import com.xiao.hao.constant.CheckParamsEnum;
import com.xiao.hao.utils.PageResult;
import com.xiao.hao.utils.Result;
import com.xiao.hao.req.XhParamsInfoInsertReq;
import com.xiao.hao.req.XhParamsInfoQueryPageReq;
import com.xiao.hao.req.XhParamsInfoUpdateReq;
import com.xiao.hao.facade.XhParamsInfoFacade;
import com.xiao.hao.utils.BaseId;

/**
*
*
* @Description 变量表数据 controller层
* @Author xiaohao
* @Date 2025-03-06 17:15:39
*/

@Api(tags = "变量表数据控制层")
@RestController
@Slf4j
@RequestMapping("xhParamsInfo")
public class XhParamsInfoController {


    @Resource
    private XhParamsInfoFacade facade;

    @ApiOperation(value = "新增")
    @PostMapping("insert")
    @CheckParamsAnnotation(CheckParamsEnum.INSERT_CHECK)
    public Result insert(@RequestBody XhParamsInfoInsertReq req) {
      return facade.insert(req);
    }

    @ApiOperation(value = "编辑")
    @PostMapping("update")
    @CheckParamsAnnotation(CheckParamsEnum.UPDATE_CHECK)
    public Result update(@RequestBody XhParamsInfoUpdateReq req) {
      return facade.update(req);
    }

    @PostMapping("delete")
    @ApiOperation(value = "删除")
    public Result delete(@RequestBody BaseId req) {
      return facade.delete(req);
    }

    @ApiOperation(value = "分页查询")
    @PostMapping("queryPage")
    public PageResult queryPage(@RequestBody XhParamsInfoQueryPageReq req) {
      return facade.queryPage(req);
    }


}


